//
//  SecondViewController.swift
//  Exercise001
//
//  Created by zhangpoor on 17/2/23.
//  Copyright © 2017年 zhangpoor. All rights reserved.
//

import UIKit



class SecondViewController: ZP_BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        let _v001:UIButton = UIButton(type: .custom)
        _v001.addTarget(self, action: #selector(btnClickAction), for: .touchUpInside)
        _v001.backgroundColor = UIColor.red;
        
        self.view.addSubview(_v001)
        
        
        
        
        _v001.snp.makeConstraints { (make) in
            
            make.top.equalTo(self.view).offset(80)
            make.left.equalTo(self.view).offset(20)
            make.width.equalTo(120)
            make.height.equalTo(40)
            
        }
        
        self.testFun()
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    
    func btnClickAction(_ sender:UIButton) -> Void {
        //self.open("zpu://zhangpoor.indv/tab02/vc001")
        //ZP_URLRouter.open(self,"VController001")
        
        
        
        
        self.open("zhangpoor://abc.com")
    }
    
    func testFun () {
        //let list:NSArray = NSArray(contentsOfFile: NSHomeDirectory() + "/Documents/webs.plist")
        
        let fileUrl = Bundle.main.resourcePath! + "/ZP_RouterInfo.plist"
        NSLog("fileUrl:\(fileUrl)")
        let info = NSDictionary(contentsOfFile: fileUrl)
        
        
        NSLog("info:\(info)")
    }

}

